<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;

        }

        .searchbox {
            margin: 10px;
        }

        .searchbox input {
            border: 0;
            border-radius: 10px;
            padding: 10px;
            background: #f5f5f5;
        }

        #app .block {
            margin: 10px;
            height: 100px;
        }

        #app span {
            margin: 10px;
            display: inline-block;
            background-color: #f5f5f5;
            padding: 5px 10px;
            border-radius: 5px;
            margin-right: 10px;
            margin-bottom: 10px;
        }

        #app .discover {
            margin: 10px;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" placeholder="输入关键词" v-model="searchText">
            <button @click="search">搜索</button>
        </div>

        <div class="block">
            <p>历史搜索</p>
            <div class="list">
                <span v-for="(item,index) in searchArr">{{item}}</span>
            </div>
        </div>

        <div class="discover">
            <p>搜索发现</p>
            <div class="list">
                <span v-for="(item,index) in searchArrone">{{item}}</span>
            </div>
        </div>

    </div>







    <script src="vue-2.5.21.js"></script>
    <script src="index-搜索.js"></script>
</body>

</html>